package com.amit.Basic_Simple_Program;

import java.util.Scanner;

public class Prime_Number 
{

	public static void main(String[] args)
	{

		System.out.println("Please enter a number");
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		boolean flag=true;
		for(int i=2;i<=n/2;i++)
		{
			if(n%i==0)
			{
				flag=false;
				break;
			}
			
		}
		
		if(flag)
		{
			System.out.println("It is a prime");
		}
		else
		{
			System.out.println("It is not prime ");
		}
		
		
	}

}
